home *** CD-ROM | disk | FTP | other *** search
/ ShareWare OnLine 2 / ShareWare OnLine Volume 2 (CMS Software)(1993).iso / elecmail / cs_mac07.zip / CS-MAC.MAC < prev    next >
Text File  |  1993-03-28  |  50KB  |  1,211 lines

  1.  
  2.  ┌────────────────────────────────┐
  3.  │  Chuck Seyboldt's COMMO Macro  │   CS-MAC07:CS-MAC.MAC
  4.  └────────────────────────────────┘
  5.   *
  6.   *  You will need to  *> !EDIT! <*  Only One (1) of these .MAC files
  7.   *                       ^^^^^^
  8.   *  The file you are reading does  *NOT*  require editing.
  9.   *
  10. ***  You  *must*  edit your COMMO.FON to automate mail and file fetching.
  11.   *  To do so automatically, Press Alt-M and choose "Add a new BBSID".
  12.   *
  13. ! *  Contents:  CS-COMMO.MAC    The Base Commo Macro file (may REN to COMMO.MAC)
  14. ^ *             TABLE.MAC       Prompts for a variety of BBS and Mail doors
  15. │ *             LOGON.MAC       Generic Logon and Mailrun routines
  16. │ *             ACTION.MAC      File fetchin' and sendin' routines
  17. │ *             CS-MAC.MAC      This text plus menu and config drivers
  18. │ *             ASSIGN.KEY      List of COMMO.MAC key assignments
  19. ^ *
  20. ! *  In CS-COMMO.MAC, you *NEED* to edit lines that have a "!"
  21.   *  in the first column.  These lines deal with BBS definition,
  22.   *  F-key dialing conveniences, and Autopilot operation.
  23.   *
  24.   *  All "editing required" lines are grouped near the end of CS-COMMO.MAC
  25.   *  to provide easiest installation and upgrading.
  26.   *
  27.   *  CS-MAC provides an automated mail and file fetchin' Commo environment.
  28.   *  This automation is accomplished with several linked macros.
  29.   *
  30.   *  COMMO.FON links to COMMO.MAC    with a linked macro label.
  31.   *  COMMO.MAC links to TABLE.MAC    to setup MailWare and BBSWare responses.
  32.   *  TABLE.MAC links to LOGON.MAC    A generic logon occurs.  If the
  33.   *                                  macro label has an ACTION file
  34.   *                                  associated with it .....
  35.   *  LOGON.MAC links to ACTION.MAC   for file transfers.  After file
  36.   *                                  transfers are complete ....
  37.   *  ACTION.MAC returns to LOGON.MAC for a MAILRUN.  After logoff,
  38.   *  LOGON.MAC returns to COMMO.MAC  and dials the next marked entry.
  39.   *
  40.   *  In pictures, the sequence looks something like this .......
  41.   *
  42.   * +-------------------------+           +----------------------------+
  43.   * | 1.    COMMO.FON         |           | 2.      COMMO.MAC          |
  44.   * |-------------------------|           |----------------------------|
  45.   * | BBS  {#}  {_pas}  {lnk} | ----|     | {:start}   set your name   |
  46.   * | set bbsid, abbr, bbs ...|     |     | and other personal stuff   |
  47.   * +-------------------------+     |     | --------                   |
  48.   *                                 |     |    Central Commo Control   |
  49.   * +----------------------------+  |     | {:various} key assignments |
  50.   * | 3.      TABLE.MAC          |  |     | for manual terminal control|
  51.   * |----------------------------|  |     | --------                   |
  52.   * | {:m_ware} MAILware prompt  |  |---> | {:lnk} {unmark .FON} option|
  53.   * |           table            |        |                            |
  54.   * | ---------                  |        | {:qwk} {load TABLE.MAC,qwk}| --|
  55.   * | {:bbs_type} BBSware prompt |        +----------------------------+   |
  56.   * |             table          |                                         |
  57.   * | ---------                  |                                         |
  58.   * | {:qwk} {call m_ware}       | <---------------------------------------|
  59.   * |        {call bbs_type}     |
  60.   * |        {load LOGON.MAC,glr}| --|
  61.   * |                            |   |    +-----------------------------+
  62.   * +----------------------------+   |    | 4.       LOGON.MAC          |
  63.   *                                  |    |-----------------------------|
  64.   *                                  |    | {:respond} set generic BBS  |
  65.   *                                  |    |            response strings |
  66.   *                                  |    | --------                    |
  67.   *                                  |--> | {:glr} Generic Logon Routine|
  68.   * +----------------------------+        |        Using responses from |
  69.   * | 5.      ACTION.MAC         |        |        TABLE.MAC & LOGON.MAC|
  70.   * |----------------------------|        |                             |
  71.   * | {open and read ACTION}     | <----- | {ifex ACTION,load ACTION!}  |
  72.   * | {fetch and send files}     |        | {otherwise, goto :noact}    |
  73.   * |     --> By BBSID           |        |                             |
  74.   * | {load LOGON.MAC,noact}     | -----> | {:noact} BBSID empty?  If so|
  75.   * |                            |        |          return to COMMO.MAC|
  76.   * +----------------------------+        |                             |
  77.   *    (ACTION.MAC is optional)           | {:mailrun} Open maildoor    |
  78.   *                                       |            Send a .REP      |
  79.   *                                       |            Take a .QWK      |
  80.   *                                       | {:byz}     Loop to TABLE.MAC|
  81.   *                                       |             if %door2 exists|
  82.   *                                       |             Then to LOGON   |
  83.   *                                       |             for second mail |
  84.   *                                       | {:bye}     Logoff BBS       |
  85.   *                                       |   {load COMMO.MAC,aln}      |
  86.   *                                       |    (Dial marked BBS's)      |
  87.   *                                       |                             |
  88.   *                                       +-----------------------------+
  89.   *
  90.   *  Names and definitions:
  91.   *
  92.   *  %bbsid    The .QWK identifier (%bbsid empty skips attempt at mail)
  93.   *  %dorno    The string to send to the host to get to MAILware prompt
  94.   *  %mprot    The mail transfer protocol to use.  Z, Y, X-CRC supported
  95.   *  %abbr     A two or three character convenience with various uses:
  96.   *            - .ext for ACTION. files.  Separate ACTION per %bbsid
  97.   *            - identity for .qwk renaming and ACTION. archiving
  98.   *
  99.   *  BBSware:  One of a variety of BBS software packages that is available.
  100.   *            This family of Commo macros supports;
  101.   *            -  PCBoard v14.5a    (Clark Development)
  102.   *            -  Spitfire
  103.   *            -  Wildcat!          (Mustang Software)
  104.   *            -  Remote Access
  105.   *            -  GAP
  106.   *            -  T.A.G.
  107.   *            -  MacroBBS          (Jeff Oberlee's BBS via Commo macros)
  108.   *            -  MAXIMUS-CBCS
  109.   *
  110.   *  MAILware: One of a family of mail doors
  111.   *            This family of Commo macros supports;
  112.   *            -  MarkMail 2        (Cliff Watkins)
  113.   *            -  Qmail 2           (Mark Herring)
  114.   *            -  Qmail 4           (Mark Herring)
  115.   *            -  Jimmer            (Jim Goodenough)
  116.   *            -  Jetmail
  117.   *            -  MKQwk
  118.   *            -  DCQwk
  119.   *            -  Rosemail
  120.   *            -  Silver Express
  121.   *            -  Charlie's OFFline .QWK Reader
  122.   *            -  ZIPNEWS           (Jack Kilday)
  123.   *
  124. *───────────────────────────────────────────────────────────────────────────────
  125.   *
  126.   *  Lines with a  "*"  may be deleted.
  127.   *  Deleting my comments is a good thing to do, it saves much RAM.
  128.   *  Use the macro subroutine ":strip" to automagically clean up .MACs
  129.   *
  130.   *  You have exactly the same macro family that I use myself.
  131.   *  Supported by COMMO v5.41   The macro text has terse commentary.
  132.   *
  133.   *  You may use a file, RENQWK.BAT, in your COMMO home directory, to
  134.   *  rename .QWK packets to avert download crashes.  If you choose to
  135.   *  not use a RENQWK.BAT, LOGON.MAC has built in renaming macro routines.
  136.   *  An example RENQWK.BAT is in the LOGON.MAC file ... ready to snip out.
  137.   *
  138.   *  Many thanks to Fred Brucker for providing the intelligent, excellent
  139.   *  platform that supports this work.  COMMO is powerful and fun.
  140.   *
  141.   * ASSUMPTIONS *
  142.   *
  143.   *  These macros are setup with Zmodem as the default transfer protocol.
  144.   *  I assume that you set complete drive:path\filename.ext for %z_prog
  145.   *
  146.   * KEY ASSIGNMENTS *
  147.   *
  148.   *  These macros contain many features that can be called without
  149.   *  being ONLINE or in a mailrun.  Review ASSIGN.KEY for key assigments.
  150.   *
  151.   * FEATURES *
  152.   *
  153.   *     -  fast
  154.   *     -  runs unattended
  155.   *     -  one macro for many BBSs
  156.   *     -  one session may call several BBSs
  157.   *     -  works for MarkMail, Qmail, RoseMail, Jimmer, JetMail, MKQwk
  158.   *        (all BBS and mail door prompts be set to EXPERT)
  159.   *     -  renames .QWK files  (with configurable renaming methods)
  160.   *     -  deletes .REP files  (testing ERRORLEVEL from transfer)
  161.   *     -  checks message count from  MarkMail  and other doors.
  162.   *        Skips mail download if message count is less than 30.
  163.   *     -  ACTION PROCESSOR macro for file uploads and downloads.
  164.   *     -  Includes a macro (Alt-F) that will prompt you for selections
  165.   *        and make the BBS specific "ACTION" lists based on your input.
  166.   *     -  Keeps a timestamped ACTION history file for each BBS.
  167.   *     -  Lean use of RAM by using multiple .MAC files instead of 1 big one.
  168.   *     -  Easily expands to new or changing BBSware and MAILware.
  169.   *     >  Can open multiple mail doors on one phone call.
  170.   *     >  Supports more than one type of mail reader (packet design).
  171.   *     >    By example, supports both .QWK and .ZNS based mail doors.
  172.   *     >  Autopilot facility for extended unattended running.
  173.   *     >  Menu driven session management and BBS additions.
  174.   *     >  Can be set to capture newfiles list with %flag variable.
  175.   *     >  Now, easier future upgrades via CS-MACxx.CFG facility.
  176.   *     >  Includes a macro to strip comments from .MAC files (saving RAM).
  177.   *     >  Includes a modem configuration macro.
  178.   *
  179.   *  Support  *
  180.   *
  181.   *     -  I really enjoy sharing COMMO.  Your questions and advice
  182.   *        are welcome.  You may find me in U'NI's and Ilink's COMMO
  183.   *        conferences almost daily ... on RIME via Directory Assistance
  184.   *        occasionally ... or at NLBBS (1,207 761-4782).
  185.   *     -  No $ charge for this work.  It's full of room to improve.
  186.   *        I consider your comments to be ample payment.
  187.   *
  188. *───────────────────────────────────────────────────────────────────────────────
  189.   *
  190.   *  One of the beauties of Commo is the ease with which it can call other
  191.   *  DOS programs.  These assigments may help as you peruse my COMMO.MAC.
  192.   *
  193.   *                                      Tradename     Author
  194.   *
  195.   *  Support files in my %ramdr are:     LIST.COM      (Vern Buerg)
  196.   *                                      QEDIT.EXE     (Sam Mitchell)
  197.   *                                      DSZ.COM       (Chuck Forsberg)
  198.   *  as well as the requisite            COMMAND.COM
  199.   *
  200.   *  Support files in my %dosdir are:    COMMOPNS.EXE  (Shad Muegge)
  201.   *                                      HSLINK.EXE    (Sam Smith)
  202.   *
  203.   *  Support files in my %utildir are:   PHONE.EXE     (Johnathan Wayne)
  204.   *                                      DFR.COM       (Gordon Haff)
  205.   *                                      MJOG.COM      (Chris Dunford)
  206.   *
  207.   *  Support file in my %ins_dir are:    COMMO.DOC     (Fred Brucker)
  208.   *                                      MACRO.DOC     (Fred Brucker)
  209.   *  The Home key uses your external LIST program to read docs.
  210.   *
  211.   *  The %savedir holds these files:     WHATEVER.CAP    (session captures)
  212.   *                                      USED-ACT.%abbr% (ACTION-file history)
  213.   *                                      ADDRESS         (address book)
  214.   *                                      RING.LOG        (timestamp of RINGs)
  215.   *
  216.   *  The Commo %_hom% directory has:     ASSIGN.KEY      (one-page-help  screen)
  217.   *                                      ACTION.%abbr%   (ACTION-file to be run)
  218.   *
  219.   *                                      COMMO.MAC      \
  220.   *                                      TABLE.MAC        \   Components
  221.   *                                      LOGON.MAC         >  of  CS-MAC
  222.   *                                      ACTION.MAC       /   Linked  to
  223.   *                                      CS-MAC.MAC     /     each other
  224.   *
  225.   *                                      RINGLOG.MAC    \   Aux facilities
  226.   *                                      DOSFUNC.MAC     >
  227.   *                                      MACROBBS.MAC   /   (Jeff Oberlee)
  228.   *
  229. *───────────────────────────────────────────────────────────────────────────────
  230.   *
  231.  {:retu}       {retu}                           ;very handy labelname
  232.  
  233.  ┌─────────────────────────────────────────────────┐
  234.  │  Menu driven addition of new BBSs to COMMO.FON  │
  235.  └─────────────────────────────────────────────────┘
  236.  
  237.  {:new_bbsid}                                   ;Alt-M from COMMO.MAC
  238.          {sete-p0 clea}
  239.          {setv temp}
  240.          {setv bbsid}
  241.          {setv doorno}
  242.          {setv bbsware}
  243.          {setv mailware}
  244.          {inpu temp,Search %_fon for what BBS?}
  245.          {comp temp}    {ifco clea}
  246.          {rope %_hom%%_fon,pick_1}
  247.          {setv count,1}
  248.          {clea}
  249.  {:id_loop}
  250.          {disp %count,1,87,Searching ...}
  251.          {read line}
  252.          {inst line,%temp}
  253.          {ifco ,id_loop}
  254.          {subs line,1,50,%line}
  255.          {disp %count,1,0e,%count.  }
  256.          {disp %count,4,07,%line}
  257.          {incr count}
  258.          {goto id_loop}
  259.  
  260.  {:pick_1}
  261.          {disp %count,1,07,             }
  262.          {inpu cntr,Which Number?  [PgUp] sees behind box}
  263.          {comp cntr}     {ifco new_bbsid}
  264.          {comp cntr,%count}
  265.          {ifco-ge pick_1}
  266.          {comp cntr,0}   {ifco pick_1}
  267.          {setv count,1}
  268.          {clea}
  269.          {disp 1,1,07,Scanning for "%temp%" Selection #: %cntr}
  270.          {rope %_hom%%_fon,clect_bbs}
  271.  {:next_b}
  272.          {read line}
  273.          {inst line,%temp}
  274.          {ifco ,next_b}
  275.          {comp cntr,%count}
  276.          {ifco this_b}
  277.          {incr count}
  278.          {goto next_b}
  279.  {:this_b}
  280.          {subs line,1,80,%line}
  281.          {disp 1,1,07,%line}
  282.          {rclo}
  283.  
  284.          {setv cs_col,70}
  285.          {setv bbs_col,20}
  286.          {setv mwa_col,30}
  287.          {setv ope_col,50}
  288.          {setv cfm_col,60}
  289.  
  290.          {disp 4,30,%cs_col,   Welcome to  CS-MAC  }
  291.          {disp 5,30,%cs_col,   Welcome to  CS-MAC  }
  292.          {disp 6,30,%cs_col,   Welcome to  CS-MAC  }
  293.          {disp 7,30,%cs_col,   Welcome to  CS-MAC  }
  294.          {disp 8,30,%cs_col,   Welcome to  CS-MAC  }
  295.  
  296.          {inpu bbsid,What is the BBSID for this Board?}
  297.          {comp bbsid}   {ifco clea}
  298.  
  299.          {disp 16,28,%bbs_col,   pcb  =  PCBoard         }
  300.          {disp 17,28,%bbs_col,   s-f  =  Spitfire        }
  301.          {disp 18,28,%bbs_col,   wc!  =  Wildcat!        }
  302.          {disp 19,28,%bbs_col,   gap  =  GAP             }
  303.          {disp 20,28,%bbs_col,   rma  =  Remote Access   }
  304.          {disp 21,28,%bbs_col,   tag  =  T.A.G.          }
  305.          {disp 22,28,%bbs_col,   mac  =  MACRObbs        }
  306.          {disp 23,28,%bbs_col,   max  =  MAXIMUS-CBCS    }
  307.  
  308.          {sete-p0 g_0}
  309.  {:g_0}  {inpu bbsware,Choose BBSware for %bbsid from the list below}
  310.          {comp bbsware,pcb} {ifco g_1}
  311.          {comp bbsware,s-f} {ifco g_1}
  312.          {comp bbsware,wc!} {ifco g_1}
  313.          {comp bbsware,gap} {ifco g_1}
  314.          {comp bbsware,rma} {ifco g_1}
  315.          {comp bbsware,tag} {ifco g_1}
  316.          {comp bbsware,mac} {ifco g_1}
  317.          {comp bbsware,max} {ifco g_1}
  318.          {goto g_0}
  319.  
  320.  {:g_1}  {sete-p0 g_1}
  321.          {disp 16,28,%mwa_col,   mm2  =  MarkMail 2      }
  322.          {disp 17,28,%mwa_col,   coq  =  Charlie's OL qwk}
  323.          {disp 18,28,%mwa_col,   qm4  =  Qmail 4         }
  324.          {disp 19,28,%mwa_col,   jmr  =  Jimmer          }
  325.          {disp 20,28,%mwa_col,   jet  =  JetMail         }
  326.          {disp 21,28,%mwa_col,   ros  =  ROSEmail        }
  327.          {disp 22,28,%mwa_col,   dcq  =  DCQwk           }
  328.          {disp 23,28,%mwa_col,   mkq  =  MKQwk           }
  329.          {disp 24,28,%mwa_col,   zns  =  ZIPNEWS Door    }
  330.  
  331.          {inpu mailware,Choose MAILware for %bbsid from the list below}
  332.          {comp mailware,mm2} {ifco g_2}
  333.          {comp mailware,coq} {ifco g_2}
  334.          {comp mailware,qm2} {ifco g_2}
  335.          {comp mailware,qm4} {ifco g_2}
  336.          {comp mailware,jmr} {ifco g_2}
  337.          {comp mailware,jet} {ifco g_2}
  338.          {comp mailware,ros} {ifco g_2}
  339.          {comp mailware,dcq} {ifco g_2}
  340.          {comp mailware,mkq} {ifco g_2}
  341.          {comp mailware,slx} {ifco g_2}
  342.          {comp mailware,zns} {ifco g_2}
  343.          {goto g_1}
  344.  
  345.  {:g_2}  {sete-p0 g_2}
  346.          {disp 16,28,%ope_col,   Some examples of DOOR   }
  347.          {disp 17,28,%ope_col,   commands to help you:   }
  348.          {disp 18,28,%ope_col,                           }
  349.          {disp 19,28,%ope_col,       open markmail^|      }
  350.          {disp 20,28,%ope_col,                           }
  351.          {disp 21,28,%ope_col,       s^|~~~~~~~~~~f^|      }
  352.          {disp 22,28,%ope_col,                           }
  353.          {disp 23,28,%ope_col,       /Q^|                 }
  354.          {disp 24,28,%ope_col,                           }
  355.  
  356.          {inpu dorno,Enter the BBS Command to enter the Maildoor}
  357.  
  358.          {sete-p0 new_bbsid}
  359.          {subs abbr,1,2,%bbsid}
  360.  
  361.          {disp 4,30,%cfm_col,                       }
  362.          {disp 5,30,%cfm_col,                       }
  363.          {disp 6,30,%cfm_col,                       }
  364.          {disp 7,30,%cfm_col,                       }
  365.          {disp 8,30,%cfm_col,                       }
  366.  
  367.          {disp 4,30,%cfm_col,    LINK = ^(:qwk^)}
  368.          {disp 5,30,%cfm_col,    ABBR = %abbr}
  369.          {disp 6,30,%cfm_col,    BBSID = %bbsid}
  370.          {disp 7,30,%cfm_col,    BBSware = %bbsware}
  371.          {disp 8,30,%cfm_col,    MAILware = %mailware}
  372.  
  373.          {setv ok}
  374.          {sete-p0 clea}
  375.          {inpu ok,Enter YES to write COMMOFON.NEW}
  376.          {inst ok,n}     {ifco clea}
  377.          {comp ok,yes}   {ifco ,new_bbsid}
  378.          {disp ,,,^mCOMMOFON.NEW can be your new dialing directory.^j}
  379.          {disp ,,,^mYou need to EXIT Commo and rename COMMOFON.NEW to COMMO.FON^j}
  380.          {disp ,,,^mfor these additions to take effect.^j^j}
  381. *
  382. *    ┌───────────────────────────────────────────────────────────────────┐
  383. *    │  Example of the data to be appended to an entry in COMMOFON.NEW;  │
  384. *    │                                                                   │
  385. *    │  (bbsid,escape) (abbr,es) (dorno,mmail|) (mail,mm2) (bbs,pcb)     │
  386. *    └───────────────────────────────────────────────────────────────────┘
  387.  
  388.          {ifex %_hom%commofon.new,freshen}
  389.          {exec-n copy %_hom%%_fon %_hom%commofon.bak}
  390.          {goto rope}
  391.  {:freshen}
  392.          {exec-n copy %_hom%commofon.new %_hom%commofon.bak}
  393.  {:rope} {rope %_hom%commofon.bak,clea}
  394.          {wope %_hom%commofon.new}
  395.          {setv count,1}
  396.  {:add_fon}
  397.          {read line}
  398.          {inst line,%temp}
  399.          {ifco ,add_line}
  400.          {comp cntr,%count}
  401.          {ifco append}
  402.          {incr count}
  403.  {:add_line}
  404.          {writ %line}
  405.          {goto add_fon}
  406.  {:append}
  407.          {inst line,^)}
  408.          {subs p1,1,%_pos,%line} {setv pos,%_pos} {incr pos,2}
  409.          {subs p2,%pos,255,%line}
  410.          {inst p2,^)}            {setv pos,%_pos} {incr pos,2}
  411.          {subs p3,%pos,255,%p2}
  412.          {subs p2,1,%_pos,%p2}
  413.          {inst p3,^)}            {setv pos,%_pos} {incr pos,2}
  414.          {subs p4,%pos,255,%p3}
  415.          {subs p3,1,%_pos,%p3}
  416.          {inst p3,^(}
  417.          {subs p3,1,%_pos,%p3}
  418.          {setv p3,%p3%qwk^)}
  419.          {setv line,%p1 %p2 %p3 %p4 ^(bbsid,%bbsid^) ^(abbr,%abbr^) ^(dorno,%dorno^) ^(mail,%mailware^) ^(bbs,%bbsware^)}
  420.          {writ %line}
  421.          {incr count}
  422.          {goto add_fon}
  423.  
  424.  {:clea} {setv line}
  425.          {setv p1}
  426.          {setv p2}
  427.          {setv p3}
  428.          {setv p4}
  429.          {setv ok}
  430.          {setv abbr}
  431.          {setv cntr}
  432.          {setv mailware}
  433.          {setv bbsware}
  434.          {setv cs_col}
  435.          {setv bbs_col}
  436.          {setv mwa_col}
  437.          {setv ope_col}
  438.          {setv cfm_col}
  439.          {clea}
  440.          {exec-n del %_hom%commofon.bak}
  441.          {macl %_mac,auto}                      ;return control to COMMO.MAC
  442.  
  443.  ┌────────────────────────────────────────────┐
  444.  │  Edit COMMO.MAC with your external editor  │
  445.  └────────────────────────────────────────────┘
  446.  * The short macro below uses an external editor to edit COMMO.MAC.
  447.  * It is called from COMMO.MAC ... putting CS-MAC in Commo's memory while
  448.  *      you are editing COMMO.MAC.
  449.  * The revised COMMO.MAC is active after you close your editor.
  450.  
  451.  {:ed_cmac}
  452.          {exec-n %ext_ed %_hom%%_mac}   {macl %_mac,auto}
  453.  
  454.  ┌────────────────────────────┐
  455.  │  Menu Driver for Sessions  │
  456.  └────────────────────────────┘
  457.  * This menu driver features the use of :parse to draw and fill
  458.  * boxes.  It also contains :box_draw and :box_fill routines.
  459.  
  460.  {:s_menu}
  461.          {setv row,%_row}
  462.          {setv col,%_col}
  463.          {sete-p0 mnu_x}
  464.          {setv mt}                      ;reset flags
  465.          {setv hold}
  466.          {setv count,0}                 ;initialize various
  467.          {setv pcount,0}                ;initialize :parse
  468.          {setv c_mtit,70}               ;set menu title color
  469.          {setv c_mbox,1f}               ;set menu box color
  470.          {setv c_menu,17}               ;set menu color
  471.          {setv c_pbox,07}               ;set prompt box color
  472.          {setv c_pmpt,0e}               ;set menu prompt color
  473.          {setv c_sbar,30}               ;set summary bar color
  474.          {setv c_bbs,0e}                ;set bbslist color
  475.  
  476.          {disp 3,23,%c_mtit,┌────────────────────────────────────┐}
  477.          {disp 4,23,%c_mtit,│  Commo Mail & File fetchin' Menus  │}
  478.          {disp 5,23,%c_mtit,└────────────────────────────────────┘}
  479.  
  480.          {setv cmd_str,box_make 6 23 16 60 %c_mbox}
  481.          {call parse}
  482.  
  483.          {setv cmd_str,box_fill 7 24 15 59 %c_menu}
  484.          {call parse}
  485.  
  486.          {disp 8,27,%c_menu,1.  Mark BBSes to dial}
  487.          {disp 9,27,%c_menu,2.  Choose Start Time}
  488.          {disp 10,27,%c_menu,3.  Make File transfer agenda}
  489.          {disp 11,27,%c_menu,4.  }
  490.          {disp 12,27,%c_menu,5.  }
  491.          {disp 13,27,%c_menu,6.  }
  492.          {disp 14,27,%c_menu,7.  }
  493.  
  494.          {setv cmd_str,box_make 17 23 19 60 %c_pbox}
  495.          {call parse}
  496.  
  497.  {:clect}
  498.          {disp 18,24,%c_pmpt,                                    }
  499.          {disp 18,27,%c_pmpt,Your Choice: }
  500.          {disp ,,%c_pmpt,  ^h^h}
  501.  
  502.          {setg 600,mnu_x,l}
  503.          {gets-h cmd,1,mnu_x}
  504.          {comp cmd,1}        {ifco mnu_1}
  505.          {comp cmd,2}        {ifco mnu_2}
  506.          {comp cmd,3}        {ifco mnu_3}
  507.          {comp cmd,4}        {ifco mnu_4}
  508.          {goto clect}
  509.  
  510.  {:mnu_1}
  511.          {disp 18,24,%c_pmpt,                                    }
  512.          {disp 18,27,%c_pmpt,BBS Name to Mark: }
  513.          {gets cmd,8,clect}
  514.          {leng %cmd}
  515.          {comp _len,3}
  516.          {ifco-L mnu_1}
  517.          {rope %_hom%%_fon,mnu_1}
  518.  {:gto_loop}
  519.          {read line}
  520.          {inst line,%cmd}
  521.          {ifco ,gto_loop}
  522.          {rclo}
  523.          {mark %cmd}
  524.          {incr count}
  525.          {disp %count,1,%c_bbs,Marked: %cmd}
  526.          {disp 24,1,%c_sbar,  CS-MAC Agenda Summary Bar                                                     }
  527.          {disp 24,34,%c_sbar,%count BBSes Marked}
  528.          {goto mnu_1}
  529.  
  530.  {:mnu_2}
  531.          {disp 18,24,%c_pmpt,                                    }
  532.          {disp 18,27,%c_pmpt,Start Dial Time (hh:mm): }
  533.          {gets hold,5,clect}
  534.          {leng %hold}
  535.          {comp _len,5}
  536.          {ifco-E ,mnu_2}
  537.          {subs test,3,1,%hold}
  538.          {comp test,:}
  539.          {ifco ,mnu_2}
  540.          {disp 24,56,%c_sbar,Holding Until %hold^m}
  541.          {setv mt,n}
  542.          {goto clect}
  543.  
  544.  {:mnu_3}
  545.          {setv mt,n}
  546.          {macl action.mac,alf}
  547.  
  548.  {:mnu_4}
  549.           your menu additions go here
  550.          {goto clect}
  551.  
  552.  {:mnu_x}
  553.          {setv cmd_str,box_fill 3 23 19 60 00}
  554.          {call parse}
  555.          {disp %row,%col}
  556.  {:esc}  {comp count}    {ifco no_bar}
  557.          {comp count,0}  {ifco no_bar}
  558.          {disp 24,1,%c_sbar,  CS-MAC Agenda Summary Bar                                                     }
  559.          {disp 24,31,%c_sbar,%count BBSes Marked^m}
  560.          {comp hold}     {ifco no_bar}
  561.          {disp 24,51,%c_sbar,Holding Until %hold^m}
  562.  
  563.  {:no_bar}
  564.          {setv count}
  565.          {setv c_mtit}
  566.          {setv c_mbox}
  567.          {setv c_menu}
  568.          {setv c_pbox}
  569.          {setv c_pmpt}
  570.          {setv c_sbar}
  571.          {setv c_bbs}
  572.          {macl %_mac%,do_agenda}
  573.  
  574.  ┌─────────────────────────┐
  575.  │  Routine to draw a box  │
  576.  └─────────────────────────┘
  577.   * Thanks to Jim Rahfeldt for speeding these routines to draw entire lines.
  578.   *
  579.   * This routine takes five arguments:  start_row = %arg1
  580.   *                                     start_col = %arg2
  581.   *                                     end_row   = %arg3
  582.   *                                     end_col   = %arg4
  583.   *                                     box_color = %arg5
  584.  
  585.  {:box_make}
  586.          {setv dlen,%arg4}              ;preserve ending column value
  587.          {decr dlen} {decr dlen,%arg2}  ;compute dlen = line length - 2
  588.          {subs dashes,1,%dlen,──────────────────────────────────────────────────────────────────────────────}
  589.          {disp %arg1,%arg2,%arg5,┌%dashes┐}
  590.  {:bumper}
  591.          {incr arg1}
  592.          {comp arg1,%arg3}
  593.          {ifco bottom}
  594.          {disp %arg1,%arg2,%arg5,│}
  595.          {disp %arg1,%arg4,%arg5,│}
  596.          {goto bumper}
  597.  {:bottom}
  598.          {disp %arg1,%arg2,%arg5,└%dashes┘}
  599.          {setv dlen} {setv dashes}      ;free subroutine variable space
  600.          {setv arg0}
  601.          {setv arg1}
  602.          {setv arg2}
  603.          {setv arg3}
  604.          {setv arg4}
  605.          {setv arg5}
  606.          {retu}
  607.  
  608.  ┌─────────────────────────┐
  609.  │  Routine to fill a box  │
  610.  └─────────────────────────┘
  611.   * This routine takes five arguments:  start_row = %arg1
  612.   *                                     start_col = %arg2
  613.   *                                     end_row   = %arg3
  614.   *                                     end_col   = %arg4
  615.   *                                     fill_color= %arg5
  616.  
  617.  {:box_fill}
  618.          {incr arg4} {decr arg4,%arg2}  ;compute actual line length
  619.          {subs filler,1,%arg4,                                                                              }
  620.  {:boxer}
  621.          {disp %arg1,%arg2,%arg5,%filler}
  622.          {incr %arg1}
  623.          {comp arg1,%arg3}
  624.          {ifco-LE boxer}
  625.          {setv filler}                  ;free subroutine variable space
  626.          {setv arg0}
  627.          {setv arg1}
  628.          {setv arg2}
  629.          {setv arg3}
  630.          {setv arg4}
  631.          {setv arg5}
  632.          {retu}
  633.  
  634. ┌─────────────────┐
  635. │  Parse Routine  │
  636. └─────────────────┘
  637.   * This routine parses a %cmd_str% variable into "space delimited"
  638.   * arguments.  %arg0 is the routine to be called after :parse.
  639.   * Subsequent arguments %arg1, %arg2, %arg3, etc.
  640.  
  641.  {:parse}
  642.          {inst %cmd_str%, }
  643.          {ifco ,eparse}
  644.          {setv pos,%_pos}
  645.          {decr pos}
  646.          {subs arg%pcount,1,%pos,%cmd_str}
  647.          {incr pos,2}
  648.          {subs cmd_str,%pos,255,%cmd_str}
  649.          {incr pcount}
  650.          {goto parse}
  651.  {:eparse}
  652.          {setv arg%pcount,%cmd_str}
  653.          {setv cmd_str}
  654.          {setv pcount,0}
  655.          {goto %arg0}
  656.  
  657.  ┌──────────────────────┐
  658.  │  Modem Config Macro  │
  659.  └──────────────────────┘
  660.   *
  661.   *  The general purpose of this macro is to provide initial setup
  662.   *  of a modem.
  663.   *
  664.   *  This macro reads a file called MODEM.DAT
  665.   *
  666.   *  CS-MAC.MAC can send configuration strings to your modem
  667.   *  CS-MAC.MAC can modify COMMO.SET with the modem initialization
  668.   *  string recommended in MODEM.DAT
  669.   *
  670.   *  MODEM.DAT is of this general form:
  671.   *
  672.   *        Modemmake: US Robotics Courier HST
  673.   *        Configure: AT^M~~AT&F^M~~~
  674.   *        Configure: ATX6~&B1~&H1~&R2~S7=60~S11=55^M~~
  675.   *        Configure: AT^M~~AT&W^M
  676.   *        Init'lize: ATZ^M
  677.   *
  678.   *  MODEM.DAT may be made by translating a DATASTORM TECHNOLOGIES, INC.
  679.   *  file called MODEMS.DAT.  The translation is made by the :x_late
  680.   *  routine later in this macro file.
  681.   *
  682.   ***********************************************************************
  683.   *                                                                     *
  684.   * MODEMS.DAT  COPYRIGHT (C) 1991, 1992 DATASTORM TECHNOLOGIES, INC.   *
  685.   *                                                                     *
  686.   * This file is used by PCINSTAL to configure PROCOMM PLUS 2.01 for    *
  687.   * specific modems.  PLEASE DO NOT MODIFY!!  Issue Date:  12/2/92      *
  688.   *                                                                     *
  689.   ***********************************************************************
  690.   *
  691.   *  This COMMO macro is at early stages of development.  Your suggestions
  692.   *  for improvement will be taken seriously.
  693.  
  694.  {:modem}{setv row,%_row}
  695.          {setv col,%_col}
  696.          {call intro}
  697.          {sete-p0 e_modem}
  698.          {ifex %_hom%modem.dat,,no_file}
  699.          {rope %_hom%modem.dat,no_hit}
  700.          {comp oops}  {ifco go_m}
  701.          {disp 9,25,1e,▌ Manufacturer  "%temp%" not found ▐}
  702.  {:go_m} {setv temp}
  703.          {inpu temp,Enter Search criteria here}
  704.          {disp 9,25,07,                                            }
  705.          {comp temp}
  706.          {ifco e_modem}
  707.          {setv count,1}
  708.          {clea}
  709.          {disp 1,55,0e,Searching for: }
  710.          {disp 1,70,0f,%temp}
  711.          {setv col,1}
  712.          {setv row,1}
  713.          {setv ncol,4}
  714.  
  715.  {:next_m}
  716.          {disp %row,%col,87,    Searching ...  }
  717.          {read line}
  718.          {inst line,%temp}
  719.          {ifco label,next_m}
  720.  
  721.  {:label}{inst line,modemmake:}
  722.          {ifco ,next_m}
  723.          {subs 10,12,52,%line}
  724.          {inst 10,%temp}
  725.          {ifco ,next_m}
  726.          {subs line,11,34,%line}
  727.          {disp %row,%col,07,                   }
  728.          {disp %row,%col,0e,%count.    }
  729.          {disp %row,%ncol,07,%line}
  730.          {incr count}
  731.          {setv row,%count}
  732.          {comp count,25}
  733.          {ifco-l next_m}
  734.          {setv col,40}
  735.          {setv ncol,43}
  736.          {decr row,22}
  737.          {goto next_m}
  738.  
  739.  {:no_hit}
  740.          {disp %row,%col,07,                   }
  741.          {comp count,1}
  742.          {ifco-g model_c}
  743.          {setv oops,y}
  744.          {goto modem}
  745.  
  746.  {:model_c}
  747.          {setv cntr}
  748.          {inpu cntr,Which Number?  [PgUp] sees behind box}
  749.          {comp cntr}     {ifco modem}
  750.          {comp cntr,%count}
  751.          {ifco-ge model_c}
  752.          {comp cntr,0}   {ifco model_c}
  753.          {setv count,1}
  754.          {clea}
  755.          {disp 1,1,07,Scanning for "%temp%" Selection #: %cntr}
  756.          {rope %_hom%modem.dat,e_modem}
  757.  
  758.  {:next_n}
  759.          {read line}
  760.          {inst line,%temp}
  761.          {ifco chek,next_n}
  762.  
  763.  {:chek} {inst line,modemmake:}
  764.          {ifco ,next_n}
  765.          {subs 10,12,52,%line}
  766.          {inst 10,%temp}
  767.          {ifco ,next_n}
  768.          {comp cntr,%count}
  769.          {ifco this_one}
  770.          {incr count}
  771.          {goto next_n}
  772.  
  773.  {:this_one}
  774.          {setv count,1}
  775.          {setv cntr,1}
  776.          {wope-a %_hom%modem.set}
  777.          {writ}
  778. {writ ***********************************************************************}
  779. {writ *                                                                     *}
  780. {writ * CS-MAC.MAC has a macro which scans MODEM.DAT.   Data below has been *}
  781. {writ * selected from MODEM.DAT to best configure your COMMO/Modem combo.   *}
  782. {writ *                                                                     *}
  783. {writ ***********************************************************************}
  784.          {writ}
  785.          {writ %line}
  786.          {setv modem,%line}
  787.          {writ}
  788.          {setv cnfg,y}
  789.          {sete-p0 e_modem}
  790.          {disp 2,1,07,%modem%}
  791.          {inpu cnfg,Send Config to your Modem now?}
  792.  {:dsp_lp}
  793.          {inst line,configure}
  794.          {ifco ,no_send}
  795.          {subs line,12,70,%line}
  796.          {writ Configuration Line %count:  %line%}
  797.  {:do_cnfg}
  798.          {incr count}
  799.          {inst cnfg,y}
  800.          {ifco ,no_send}
  801.          {send ~~~~~%line}
  802.  {:no_send}
  803.          {inst line,init'lize}
  804.          {ifco ,no_init}
  805.          {subs line,12,70,%line}
  806.          {setv init, ^(set _modini,%line^)  From MODEM.DAT & CS-MAC.MAC}
  807.          {writ}
  808.          {writ %init%}
  809.          {writ}
  810.          {setv mod,y}
  811.  {:no_init}
  812.          {read line}
  813.          {comp line}
  814.          {ifco e_modem}
  815.          {goto dsp_lp}
  816.  
  817.  {:e_modem}
  818.          {clea}
  819.          {wclo}
  820.          {rclo}
  821.          {comp mod} {ifco nonote}
  822.  
  823. {disp 1,4,07,***********************************************************************}
  824. {disp 2,4,07,* CS-MAC.MAC has written to a file named                              *}
  825. {disp 2,45,07,%_hom%MODEM.SET}
  826. {disp 3,4,07,***********************************************************************^j^m}
  827.  
  828. {disp 7,4,07,***********************************************************************}
  829. {disp 8,4,07,* If you wish, the new INIT  can be substituted in your COMMO.SET     *}
  830. {disp 9,4,07,***********************************************************************^j^m}
  831.  
  832.          {sete-p0 nonote}
  833.          {inpu mod,Modify COMMO.SET?}
  834.          {inst mod,y}    {ifco ,nonote}
  835.  
  836.          {exec-n copy %_hom%commo.set %_hom%commoset.bak}
  837.          {rope %_hom%commoset.bak,nonote}
  838.          {wope %_hom%commo.set}
  839.  {:set_loop}
  840.          {read line}
  841.          {inst line,_modini}
  842.          {ifco insert}
  843.          {writ %line}
  844.          {goto set_loop}
  845.  {:insert}
  846.          {writ}
  847.          {inst line,^(}
  848.          {setv pos,%_pos}        {incr pos}
  849.          {subs line,%pos,80,%line}
  850.          {inst line,^)}
  851.          {setv pos,%_pos}        {decr pos}
  852.          {subs l1,1,%pos,%line}
  853.          {incr pos,2}
  854.          {subs l2,%pos,80,%line}
  855.          {setv line,  %l1% %l2%}
  856.          {setv l1}
  857.          {setv l2}
  858.          {writ %line}
  859.          {writ}
  860. {writ ***********************************************************************}
  861. {writ * CS-MAC.MAC has a macro which scans MODEM.DAT.   Data below has been *}
  862. {writ * selected from MODEM.DAT to best configure your COMMO/Modem combo.   *}
  863. {writ ***********************************************************************}
  864.          {writ}
  865.          {writ  %modem}
  866.          {writ}
  867.          {writ %init}
  868.          {goto set_loop}
  869.  {:nonote}
  870.          {setv 10}
  871.          {setv mod}
  872.          {setv ncol}
  873.          {setv cntr}
  874.          {setv oops}
  875.          {setv init}
  876.          {setv modem}
  877.          {disp %row,%col}
  878.          {setv row}
  879.          {setv col}
  880.          {macl %_mac}
  881.  {:intro}{clea}
  882.  
  883. {disp 3,4,07,***********************************************************************}
  884. {disp 4,4,07,*  CS-MAC.MAC can search MODEM.DAT just like a PCBoard (Z)ippy scan.  *}
  885. {disp 5,4,07,*  Enter a portion of manufacture or model or feature name to get a   *}
  886. {disp 6,4,07,*  list (e.i. "HST", "v.32", "Robotics", "Turbo", "Speed", "Zyxel")   *}
  887. {disp 7,4,07,***********************************************************************}
  888.  
  889. {disp 16,4,07,***********************************************************************}
  890. {disp 17,4,07,*                                                                     *}
  891. {disp 18,4,07,*    CS-MAC.MAC standing ready to scan MODEM.DAT to configure COMMO.  *}
  892. {disp 19,4,07,*                                                                     *}
  893. {disp 20,4,07,***********************************************************************}
  894.  
  895.          {retu}
  896.  
  897.  {:no_file}
  898.  
  899. {disp 16,4,07,***********************************************************************}
  900. {disp 17,4,07,*                                                                     *}
  901. {disp 18,4,07,* MODEM.DAT must be in your Commo Home directory: (                   *}
  902. {disp 19,4,07,*                                                                     *}
  903. {disp 20,4,07,***********************************************************************}
  904.  
  905. {disp 18,56,70, %_hom% }
  906. {disp 18,,07,)}
  907.          {disp %row,%col}
  908.          {macl %_mac}
  909.   *
  910. *─────────────────────────────────────────────────────────────────────────────
  911.   *
  912.   *  {macl modem.mac,x_late} in your COMMO.MAC to start.
  913.   *
  914.   *  This macro routine translates a file called MODEMS.DAT which is provided
  915.   *  to support ProComm Plus.  The resulting file is called MODEM.DAT.
  916.  
  917.  {:x_late}
  918.          {setv row,%_row}
  919.          {setv col,%_col}
  920.          {sete-p0 e_modem}
  921.          {ifex %_hom%modems.dat,,no_fils}
  922.          {rope %_hom%modems.dat,no_hits}
  923.          {wope %_hom%modem.dat}
  924.  
  925.  {:loop} {read line}
  926.          {inst line,initstring}  {ifco add_in}
  927.          {inst line,transmit}    {ifco add_cf}
  928.          {inst line,modem "}     {ifco add_mo}
  929.          {goto loop}
  930.  
  931.  {:add_in}
  932.          {setv pos,%_pos}
  933.          {incr pos,12}
  934.          {subs line,%pos,80,%line}
  935.          {inst line,"}
  936.          {setv pos,%_pos}        {decr pos}
  937.          {subs line,1,%pos,%line}
  938.          {setv line,Init'lize: %line}
  939.          {writ %line}
  940.          {goto loop}
  941.  
  942.  {:add_cf}
  943.          {setv pos,%_pos}
  944.          {incr pos,10}
  945.          {subs line,%pos,80,%line}
  946.          {inst line,"}
  947.          {setv pos,%_pos}        {decr pos}
  948.          {subs line,1,%pos,%line}
  949.          {setv line,Configure: %line}
  950.          {writ %line}
  951.          {goto loop}
  952.  
  953.  {:add_mo}
  954.          {writ}
  955.          {setv pos,%_pos}
  956.          {incr pos,7}
  957.          {subs line,%pos,80,%line}
  958.          {inst line,"}
  959.          {setv pos,%_pos}        {decr pos}
  960.          {subs line,1,%pos,%line}
  961.          {setv line,Modemmake: %line}
  962.          {writ %line}
  963.          {goto loop}
  964.  
  965.  {:no_hits}
  966.          {wclo}
  967.          {rclo}
  968.          {disp %row,%col}
  969.          {macl %_mac}
  970.  
  971.  {:no_fils}
  972.  
  973. {disp 16,4,07,***********************************************************************}
  974. {disp 17,4,07,*                                                                     *}
  975. {disp 18,4,07,* MODEMS.DAT must be in your Commo Home directory: (                  *}
  976. {disp 19,4,07,*                                                                     *}
  977. {disp 20,4,07,***********************************************************************}
  978.  
  979.          {disp 18,57,70, %_hom% }
  980.          {disp 18,,07, )}
  981.          {disp %row,%col}
  982.          {macl %_mac}
  983.  
  984.  ┌────────────────────────────────────────┐
  985.  │  Routine to strip comments from .MACs  │
  986.  └────────────────────────────────────────┘
  987.   *  This routine opens a .MAC file that you specify, reads it
  988.   *  line by line, deletes lines that have an asterisk within the first
  989.   *  three characters, and removes comments following a semi-colon.
  990.   *  The new file has a file extension of .CFS
  991.   *
  992.   *  The purpose of this routine is to minimize RAM usage by
  993.   *  shortening MAC files.
  994.  
  995.  {:strip}
  996.          {sete-p0 e_strip}
  997.          {setv file,%_hom%}
  998.  {:re_in}{inpu file,name of .MAC file to strip}
  999.          {inst %file,.} {ifco ,nodot} {setv pos,%_pos} {decr pos}
  1000.          {subs file,1,%pos,%file} {setv pos}
  1001.  {:nodot}{ifex %file%.mac,,re_in}               ;make sure file exists
  1002.          {clea}
  1003.          {disp 3,1,,Stripping %file%.MAC into %file%.CFS^m^j}
  1004.          {disp ,,,Line: }
  1005.          {rope %file%.mac,e_strip}              ;open .MAC to read
  1006.          {wope %file%.cfs}                      ;open .CFS to write
  1007.          {setv count,0}
  1008.  {:s_loop}
  1009.          {incr count}
  1010.          {disp ,7,,%count}
  1011.          {read line}
  1012.          {comp line}    {ifco no_com}           ;write empty lines
  1013.          {subs temp,1,3,%line}                  ;look at first three chars
  1014.          {inst temp,*}  {ifco s_loop}           ; if a * skip the line
  1015.          {subs temp,1,11,%line}                 ;look at first 11 chars
  1016.          {inst temp,^(} {ifco ,no_com}          ;look for a left curley
  1017.          {subs line,%_pos,255,%line}            ;delete leading whitespace
  1018.          {inst line,;}  {ifco ,no_com}          ;look for a semicolon
  1019.          {setv pos,%_pos}       {decr pos}      ;get semicolon position
  1020.          {subs temp,%pos,255,%line}             ;what follows semicolon?
  1021.          {inst temp,^)} {ifco no_com}           ; if a right curly, write!
  1022.          {inst temp,)}  {ifco no_com}           ; if a right paren, write!
  1023.          {subs line,1,%pos,%line}               ;otherwise, delete comment
  1024.  
  1025.  {:no_com}
  1026.          {writ %line}                           ;xxx.MAC --> xxx.CFS file
  1027.          {goto s_loop}                          ;read next line
  1028.  {:e_strip}
  1029.          {setv count}
  1030.          {wclo}                                 ;close .CFS file
  1031.          {disp 6,1,,%file.mac has been stripped into %file.cfs^m^j}
  1032.          {exec-w10 dir %file.*}
  1033.          {macl %_mac%,ret%ret}                  ;reload base.MAC
  1034.  
  1035.  ┌──────────────────────────────────┐
  1036.  │  Menu driven .CFG file Routines  │
  1037.  └──────────────────────────────────┘
  1038.   *  These macro routines are designed for easy expansion and upgrading.
  1039.   *  After a user has run CS-MAC once, future upgrades will build on the
  1040.   *    initial configuration file.
  1041.   *  This macro also copes when a user skips versions .... the resulting
  1042.   *    .CFG file will have all (and only) new variable definitions appended.
  1043.   *  The CS-MAC user won't need to edit old, unchanged data.
  1044.  
  1045.  {:new_user}
  1046.          {call welcome}
  1047.          {sete-p0 upgrade}
  1048.          {call make_cfg}                        ;make default .cfg file
  1049.  {:upgrade}
  1050.          {sete-p0 ver_loop}
  1051.          {call thanks}
  1052.          {setv ver_ck,%ver}                     ;set var to check .cfg version
  1053.  {:ver_loop}
  1054.          {decr ver_ck}                          ;start looking for older .cfg
  1055.          {leng %ver_ck}
  1056.          {comp %_len,1} {ifco ,no_pad}          ;pad single digit version name
  1057.          {setv ver_ck,0%ver_ck}                 ; with a leading zero
  1058.  {:no_pad}
  1059.          {ifex %_hom%cs-mac%ver_ck.cfg,append}  ;looking for old .cfg file
  1060.          {comp ver_ck,06}  {ifco ,ver_loop}     ;if version = 06
  1061.          {setv ver_ck}     {goto f_loop}        ;use CS-MAC.CFG (default)
  1062.  
  1063.  {:append}
  1064.          {wope-a %_hom%cs-mac%ver_ck.cfg}       ;open old .cfg in append
  1065.          {call %ver_ck}                         ;add new default variables
  1066.  
  1067.  {:f_loop}
  1068.          {sete-p0 bail_out}
  1069.          {rope %_hom%cs-mac%ver_ck.cfg,ready}   ;open cs-macxx.cfg to read
  1070.          {wope %_hom%cs-mac%ver.cfg}            ;open newest version cs-mac.cfg
  1071.          {writ   *  CS-MAC%ver.CFG}             ;Header for newest .CFG file
  1072.          {writ   *  %_dat%  %_tim%}
  1073.          {writ}
  1074.          {writ   *  Each variable setting line in this .CFG file has}
  1075.          {writ   *  the form  ....  variable,value     ;comment here}
  1076.          {writ}
  1077.          {disp 9,20,,Don't forget ... Alt-Y will erase input field}
  1078.  {:ug_loop}
  1079.          {read line}
  1080.          {inst line,*}  {ifco ug_loop}          ;skip default header
  1081.          {comp line}    {ifco ug_loop}          ;skip blank lines
  1082.          {inst line,;}  {ifco ,no_pmt}          ;use semicolon for prompts
  1083.          {setv pos,%_pos} {incr pos}
  1084.          {subs prompt,%pos,30,%line}
  1085.          {inst line,  }                         ;use two spaces to end variable
  1086.          {setv pos,%_pos} {decr pos}            ; to allow space in name, etc.
  1087.          {subs line,1,%pos,%line}
  1088.  {:no_pmt}
  1089.          {inst line,,}  {ifco ,ug_loop}         ;is this a variable definition?
  1090.          {setv pos,%_pos} {decr pos}
  1091.          {subs var,1,%pos,%line}
  1092.          {incr pos,2}
  1093.          {subs valu,%pos,40,%line}
  1094.          {inpu valu,%var = %prompt}             ;setv according to .cfg
  1095.          {setv pad,                                    }
  1096.          {leng %var%,%valu}
  1097.          {setv pad_l,40}
  1098.          {decr pad_l,%_len}
  1099.          {subs pad,1,%pad_l,%pad}
  1100.          {writ %var%,%valu%%pad%;%prompt}
  1101.          {goto ug_loop}                         ;loop until .cfg all read
  1102.  
  1103.  {:write}{writ %line}   {goto ug_loop}
  1104.  
  1105.  {:bail_out}
  1106.          {rclo}
  1107.          {wclo}
  1108.          {exec-n del %_hom%cs-mac%ver.cfg}
  1109.          {goto commo}
  1110.  
  1111.  {:ready}
  1112.          {sete-p0 commo}
  1113.          {wclo}
  1114.          {disp 9,20,,                                             }
  1115.          {disp 9,1,,%_hom%cs-mac%ver%.cfg has been written.}
  1116.          {disp 10,1,,It will be read into your COMMO startup.^j^j^m}
  1117.          {paus 10}
  1118.  
  1119.  {:commo}{setv var}     {setv valu}
  1120.          {setv pos}     {setv prompt}
  1121.          {setv pad}     {setv pad_l}
  1122.          {setv ver_ck}
  1123.          {wclo}
  1124.          {macl %_mac%,start}
  1125.  
  1126.  {:welcome}
  1127.          {sete-p0 w_esc}
  1128.          {ifex %_hom%how,,no_how}
  1129.          {rope %_hom%how,end_w}
  1130.          {setv count,1}
  1131.  {:w_lop}{read line}
  1132.          {disp ,,,     %line^m^j}
  1133.          {incr count}
  1134.          {comp count,20}
  1135.          {ifco-l w_lop}
  1136.          {paus 30}
  1137.  {:w_esc}{setv count,1}
  1138.          {goto w_lop}
  1139.  {:end_w}{sete-p0 no_how}
  1140.          {paus 30}
  1141.  {:no_how}
  1142.          {clea}
  1143.          {disp ,,,                        Welcome to the CS-MAC series!^m^j}
  1144.          {disp ,,,             A default config file (CS-MAC.CFG) has been written for you ... ^m^j}
  1145.          {retu}
  1146.  
  1147.  {:thanks}
  1148.          {disp ,,,^j^j^m}
  1149.          {disp ,,,       Thank you for using the CS-MAC series.^m^j}
  1150.          {disp ,,,       You will now be prompted to confirm or change the setting^m^j}
  1151.          {disp ,,,       of variables for your  *PERSONAL*  %hom%CS-MAC%ver%.CFG file.^m^j}
  1152.          {retu}
  1153.  
  1154.  {:make_cfg}
  1155.          {wope %_hom%cs-mac.cfg}
  1156.          {writ   *  CS-MACxx                   Default Version %ver}
  1157.          {writ}
  1158.          {writ   *  The config file feature of the CS-MAC series}
  1159.          {writ   *  is designed to make future upgrades easier.}
  1160.          {writ}
  1161.          {writ   *  An empty line or a line with a "*" in it will be ignored}
  1162.          {writ   *  during variable definition.  These are comment lines.}
  1163.          {writ}
  1164.          {writ   *  The order of "setv" items is unimportant.}
  1165.          {writ}
  1166.          {writ   *  Each variable setting line in this .CFG file has}
  1167.          {writ   *  this form       variable,value     ;comment here}
  1168.          {writ}
  1169.          {writ name,Chuck Seyboldt                     ;your logon name}
  1170.          {writ sig,Chuck∙S                             ;your signature}
  1171.          {writ v_ph,2075551212                         ;your Voice Phone Number}
  1172.          {writ d_ph,2075551212                         ;your Data  Phone Number}
  1173.          {writ b_day,042365                            ;your Birthdate}
  1174.          {writ auto,n                                  ;"y" for Autopilot ON}
  1175.          {writ xpert,n                                 ;"y" for complex DOORWAY toggle}
  1176.          {writ grafix,y q ns                           ;ANSI logon prompt}
  1177.          {writ ramdr,d:                                ;your RAMDrive}
  1178.          {writ bu_dr,b:                                ;Backup drive for .MACs}
  1179.          {writ dosdir,c:\dos                           ;your DOS dir}
  1180.          {writ ins_dir,c:\co\ins                       ;dir for docs & instructions}
  1181.          {writ lst_dir,c:\doc                          ;dir for BBS file list storage}
  1182.          {writ savedir,c:\co\sav                       ;dir for capture files}
  1183.          {writ utildir,c:\util                         ;dir for utility programs}
  1184.          {writ ext_ed,c:\util\qedit.exe                ;drive:\path\external_editor}
  1185.          {writ ext_li,c:\util\list.com                 ;drive:\path\external_lister}
  1186.          {writ pk_zip,c:\util\pkzip.exe                ;drive:\path\ZIP_program}
  1187.          {writ pk_un,c:\util\pkunzip.exe               ;drive:\path\UNZIP_program}
  1188.          {writ prot,z                                  ;file trans protocol (z,y,x)}
  1189.          {writ mprot,z                                 ;mail trans protocol (z,y,x)}
  1190.          {writ qwkdr,c:\qwk                            ;dir for .QWK files}
  1191.          {writ repdr,c:\qwk                            ;dir for .REP files}
  1192.          {writ reader,c:\jr\jabber.exe                 ;your mail reader program}
  1193.          {writ tagfile,c:\jr\taglines.tag              ;filename for your taglines}
  1194.          {writ qrdr,qwk                                ;.QWK packet rename routine}
  1195.          {writ znr,znr                                 ;.ZNS packet rename routine}
  1196.          {writ handle,cboldt                           ;handle for Internet use}
  1197.          {writ znrdr,c:\znr                            ;dir for ZIPNEWS reader}
  1198.          {writ znpak,c:\qwk                            ;dir for ZIPNEWS packets}
  1199.          {writ cap,%%savedir\%%_mon%%%%_day.cap            ;capture filename}
  1200.          {writ}
  1201.          {writ   *  New variables will be appended based on the}
  1202. end ver  {writ   *  latest CS-MACxx.CFG in your %_hom directory}
  1203.  {:07}   {writ}
  1204.  
  1205.          (writ v8_var,version8                  ;append later version vars here)
  1206. end ver  (writ v8_v#2,version_8                 ;follow this example format)
  1207.  {:08}   (writ)
  1208.  
  1209.          {wclo}
  1210.          {retu}
  1211.